class TestClientsController < ClientsController
  before_filter :authenticate_client , :except => [ :home , :index  , :test_create ]


  def home ; render :text => 'hello' ; end ;

  def index ; @clients = Client.all ; @rooms = Room.all ; end ;

  def test_create
    params[:name]     = TEST_CLIENT_NAME
    persistent_client = Client.find_by_name (URI.escape TEST_CLIENT_NAME    )
    duplicate_client  = Client.find_by_name (URI.escape TEST_DUP_CLIENT_NAME)

    persistent_client.delete if persistent_client.present?
    duplicate_client .delete if duplicate_client .present?

    create
  end

  def cron ; Client.cleanup ; render :text => 'ok' ; end ;
end
